﻿<phone:PhoneApplicationPage 
    x:Class="Studio77.GuessLyric.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="False">
	<phone:PhoneApplicationPage.Resources>
		<Storyboard x:Name="StoryboardShow">
			<DoubleAnimation Duration="0:0:0.9" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="image" d:IsOptimized="True">
				<DoubleAnimation.EasingFunction>
					<BackEase EasingMode="EaseOut"/>
				</DoubleAnimation.EasingFunction>
			</DoubleAnimation>
			<DoubleAnimation Duration="0:0:0.9" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="image1" d:IsOptimized="True">
				<DoubleAnimation.EasingFunction>
					<BackEase EasingMode="EaseOut"/>
				</DoubleAnimation.EasingFunction>
			</DoubleAnimation>
			<DoubleAnimation Duration="0:0:0.9" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="image2" d:IsOptimized="True"/>
			<DoubleAnimation Duration="0:0:0.6" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="btnStart" d:IsOptimized="True"/>
			<DoubleAnimation Duration="0:0:0.6" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="btnNewUser" d:IsOptimized="True"/>
		</Storyboard>
		<Style x:Key="ButtonStyleStart" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Pressed">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image1">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Collapsed</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="Disabled"/>
									<VisualState x:Name="MouseOver"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Image x:Name="image1" Source="/Images/btn_start.png" Stretch="Fill"/>
							<Image x:Name="image" Source="/Images/btn_start_press.png" Stretch="Fill" Visibility="Collapsed"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="ButtonStyleNewUser" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Pressed">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image1">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Collapsed</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="Disabled"/>
									<VisualState x:Name="MouseOver"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Image x:Name="image1" Source="/Images/btn_newUserPackage.png" Stretch="Fill"/>
							<Image x:Name="image" Source="/Images/btn_newUserPackage_press.png" Stretch="Fill" Visibility="Collapsed"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</phone:PhoneApplicationPage.Resources>
	<Grid>
		<Image Source="/Images/mainpage.png" Stretch="Fill"/>
		<Grid Margin="0,10,0,0" HorizontalAlignment="Center" VerticalAlignment="Top">
			<Image Source="/Images/stageStar.png" Stretch="Fill" Width="110" Height="110" HorizontalAlignment="Center" VerticalAlignment="Top"/>
			<TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" VerticalAlignment="Center" FontFamily="Segoe WP Black" FontSize="40" Text="{Binding Text, ElementName=txtCurrentStage}" Foreground="Black" RenderTransformOrigin="0.5,0.5">
				<TextBlock.RenderTransform>
					<CompositeTransform TranslateX="2" TranslateY="3"/>
				</TextBlock.RenderTransform>
			</TextBlock>
			<TextBlock x:Name="txtCurrentStage" HorizontalAlignment="Center" TextWrapping="Wrap" Text="777" VerticalAlignment="Center" FontFamily="Segoe WP Black" FontSize="40" Foreground="White"/>
		</Grid>
		<Image x:Name="image2" Margin="337,183,10,450" Source="/Images/yf.png" Stretch="Fill" Opacity="0"/>
		<Image x:Name="image1" Margin="119,136,121,532" Source="/Images/title_crazy.png" Stretch="Fill" RenderTransformOrigin="0.5,0.5">
			<Image.RenderTransform>
				<CompositeTransform TranslateX="480"/>
			</Image.RenderTransform>
		</Image>
		<Image x:Name="image" Margin="117,260,116,451" Source="/Images/title_guess.png" Stretch="Fill" RenderTransformOrigin="0.5,0.5">
			<Image.RenderTransform>
				<CompositeTransform TranslateX="-480"/>
			</Image.RenderTransform>
		</Image>
		<Button x:Name="btnStart" Content="Button" HorizontalAlignment="Center" Height="179" Margin="0,400,0,0" Style="{StaticResource ButtonStyleStart}" VerticalAlignment="Top" Width="180" Opacity="0.3" Click="btnStart_Click"/>
		<Button x:Name="btnNewUser" Content="Button" HorizontalAlignment="Center" Height="101" Margin="0,607,0,33" Style="{StaticResource ButtonStyleNewUser}" Width="194" Opacity="0.3" Click="btnNewUser_Click"/>
	</Grid>

    <!--LayoutRoot 是包含所有页面内容的根网格-->
 
</phone:PhoneApplicationPage>